package cas.ihep.functions;

import org.apache.spark.api.java.function.Function;
import scala.Tuple2;

public abstract class FunctionTuple2<T1,T2,R> implements Function<Tuple2<T1,T2>,R>,java.io.Serializable {

    public abstract R call(T1 t1,T2 t2);

    @Override
    public R call(Tuple2<T1, T2> t1T2Tuple2) throws Exception {
        return call(t1T2Tuple2._1(),t1T2Tuple2._2());
    }
}
